package com.eatrip.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eatrip.bean.Provincia;
import com.eatrip.dao.ProvinceDAO;
import com.eatrip.service.ProvinceService;

@Service
public class ProvinceServiceImple implements ProvinceService {

	@Autowired
	private ProvinceDAO provinceDAO;
	
	@Override
	@Transactional(readOnly = true)
	public Provincia getProvincia(int id) {
		return provinceDAO.getProvincia(id);
	}

	@Override
	@Transactional(readOnly = true)
	public List<Provincia> getAllProvince(int start, int numRow) {
		return provinceDAO.getAllProvince(start, numRow);
	}

	@Override
	@Transactional(readOnly = true)
	public List<Provincia> getProvinceByIdRegione(int idRegione) {
		return provinceDAO.getProvinceByIdRegione(idRegione);
	}

	@Override
	@Transactional(readOnly = true)
	public List<Provincia> getProvinceByNomeRegione(String nome) {
		return provinceDAO.getProvinceByNomeRegione(nome);
	}

}
